Skip to content

Feature/gene regulation associations#93

Open
juanNH wants to merge 7 commits intodevfrom
feature/gene-regulation-associations
Open

Feature/gene regulation associations#93
juanNH wants to merge 7 commits intodevfrom
feature/gene-regulation-associations

Conversation

@juanNH
Copy link
Copy Markdown
Contributor

@juanNH juanNH commented Apr 25, 2026

No description provided.

Copy link
Copy Markdown
Member

@Genarito Genarito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juanNH para hacerlo más simple, encará todo esto de:

  • Documentar los métodos y componentes
  • Renombres para que sean acorde a los demás componentes del proyecto
  • Pasar todos los awaits que haya en este PR a then/catch
    Después de eso lo chequeo de nuevo, así no duplico tanto los comentarios y nos llenamos de ruido mutuamente

onApplyFilters: () => void;
}

export const ActiveGraphFiltersPanel = ({
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agregar documentación sobre qué es lo que renderiza

{ key: 'both', value: 'both', text: traversalLabels.both },
]

type Props = {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En todos los componentes nuestro estándar es llamarlo con el nombre del componente + "Props": ActiveGraphFiltersPanelProps

}

export const ActiveGraphFiltersPanel = ({
filters,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

El desglose de las props hacelo en el cuerpo del componente, acá solo dejá props: ActiveGraphFiltersPanelProps

maxLevels: 3,
}

export const GeneExpressionRegulationAssociationNetworkPanel = ({
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mismos comentarios que gene-association-network/ActiveGraphFiltersPanel.tsx

maxLevels: draftFilters[0]?.maxLevels ?? DEFAULT_ROOT_FILTER.maxLevels,
}), [draftFilters])

const queryParams = useMemo(() => ({
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esto no tiene sentido, está cacheando una constante pasándole el valor a esa constante

})
}

const handleUpdateFilter = (rootNodeId: string, partialFilter: Partial<GraphQueryFilter>) => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentar los métodos, después es imposible de mantener hasta para la IA

/>
)}

{!loading && !error && data && (
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La condición !loading && !error && data && se repite varias veces, refactorizar a una constante

export const fetchGeneGraph = async (
params: FetchGeneGraphParams
): Promise<FetchGeneGraphResponse> => {
await sleep(350)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No usamos await en todo el proyecto, usar then/catch y eliminar sleep que no sirve para nada

}
}

const collectResponse = (filters: GraphQueryFilter[]): FetchGeneGraphResponse => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentar este y cada uno de los métodos de este archivo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants